load(file = "../data/Rdata/shark_tp_data.Rdata")
shark_tp_data
shark_tp_data %>%
ggplot() +
geom_point(aes(x = detection_timestamp, y = Depth)) +
scale_y_reverse() +
facet_wrap(~ transmitter_id)
## Warning: Removed 317271 rows containing missing values (`geom_point()`).
shark_tp_data %>%
ggplot() +
geom_point(aes(x = detection_timestamp, y = Depth)) +
scale_y_reverse() +
facet_wrap(~ transmitter_id)
## Warning: Removed 317271 rows containing missing values (`geom_point()`).
shark_tp_data %>%
#filter(transmitter_id == "A69-9004-14037") %>% # If you want to look at one individual
ggplot() +
geom_point(aes(x = detection_timestamp, y = Depth)) +
scale_y_reverse() +
facet_wrap(~ station_name_long)
## Warning: Removed 317271 rows containing missing values (`geom_point()`).
shark_tp_data %>%
#filter(transmitter_id == "A69-9004-14037") %>% # If you want to look at one individual
ggplot() +
geom_point(aes(x = detection_timestamp, y = Depth)) +
scale_y_reverse() +
facet_wrap(~ station_name)
## Warning: Removed 317271 rows containing missing values (`geom_point()`).
Some receiver stations failed early in the deployment period
shark_weekly_depths <-
shark_tp_data %>%
mutate(week_date = floor_date(detection_timestamp, "week")) %>%
filter(!is.na(Depth)) %>%
group_by(week_date) %>%
summarise(weekly_max_depth = max(Depth),
weekly_min_depth = min(Depth),
weekly_mean_depth = mean(Depth)) %>%
mutate(weekly_min_depth = if_else(weekly_min_depth <0, 0, weekly_min_depth))
shark_weekly_depths %>%
ggplot() +
geom_line(aes(x = week_date, y = weekly_min_depth), colour = "blue") +
geom_line(aes(x = week_date, y = weekly_mean_depth), colour = "grey30") +
geom_smooth(aes(x = week_date, y = weekly_mean_depth), colour = "grey30", method = "gam", formula = y ~ s(x, bs = 'cs'), level = 0.95) +
geom_line(aes(x = week_date, y = weekly_max_depth), colour = "red") +
geom_smooth(aes(x = week_date, y = weekly_max_depth), colour = "red", method = "gam", formula = y ~ s(x, bs = 'cs'), level = 0.95) +
scale_y_reverse() +
xlab("Date") +
ylab("Averaged weekly depths \n (m below sealevel)")
daymax_dep_plot <-
shark_tp_data %>%
mutate(date = date(detection_timestamp)) %>%
filter(!is.na(Depth)) %>%
group_by(date) %>%
summarise(daily_max_depth = max(Depth),
daily_min_depth = min(Depth),
daily_mean_depth = mean(Depth)) %>%
ungroup() %>%
ggplot() +
geom_point(aes(x = date, y = daily_max_depth)) +
#geom_point(aes(x = date, y = roll_mean), data = SST_comb3, colour = "blue") +
#geom_line(aes(x = date, y = roll_mean), data = SST_comb3, colour = "blue")
#geom_smooth(aes(x = date, y = max_depth)) +
scale_y_reverse()
shark_tp_data %>%
#filter(station_name_long == 'Lagoon_2')# %>% # Just looking at Silver City for now as it is the only one with observations for the whole period
ggplot() +
geom_point(aes(x = detection_timestamp, y = Depth)) +
scale_y_reverse() +
facet_wrap(~station_name)
## Warning: Removed 317271 rows containing missing values (`geom_point()`).
Same with depth - pattern replicated by most individuals. Interesting to look at #14049 who didn’t make as many deep moves and whose overall temperatures look higher than the others.